Abuzar Akhtar
B.tech CSE

basic-probability-895069e2-07b2-4910-8e39-ca26b60713bf

B a s i c P r o b a b i l i t y B a s i c P r o b a b i l i t y BasicProbabilityBasic\,ProbabilityBasicProbability


Probability is a way to measure the chances of something happening. It helps us understand how likely or unlikely an event is. Probability ranges from 0 (impossible) to 1 (certain). It is used in many areas, like predicting the weather or winning a game. We can calculate probabilities by defining all possible outcomes and assigning numbers to represent their likelihood. It's a useful tool for making decisions when we're unsure about the outcome.

Sets

You may omit this section if you are familiar with these concepts.
A set is a collection of distinct objects.
We often specify a set by listing its members, or elements, in parentheses like this {}. For example A = {2, 4, 6, 8} means that A is the set consisting of numbers 2,4,6,8. We could also write A ={even numbers less than 9}.

Set Operations

  • Union: The union of A A AAA and B B BBB is the set of elements which belong to A A AAA or to B B BBB (or both) and can be written as A B A B A uu BA ∪ BAB.
  • Intersection: The intersection of A A AAA and B B BBB is the set of elements which belong to both A A AAA and B B BBB, and can be written as A B A B A nn BA ∩ BAB.
  • Complement: The complement of A A AAA, frequently denoted by A ¯ A ¯ bar(A)\bar{A}A¯, is the set of all elements which do not belong to A A AAA. In making this definition we assume that all elements we are thinking about belong to some larger set U U UUU, which we call the universal set.
  • Difference: The difference of two sets A A AAA and B B BBB, denoted as A A AAA \ B B BBB or A B A B A-BA - BAB, is the set that contains all the elements that are in A A AAA but not in B B BBB.
  • Cartesian Product: The Cartesian product of two sets A A AAA and B B BBB denoted as A × B A × B A xx BA × BA×B, is the set of all possible ordered pairs ( a , b ) ( a , b ) (a,b)(a, b)(a,b) where a is in A A AAA and b b bbb is in B B BBB.
Sets are used in probability theory to represent events. The union of two events represents the event that either one or both occur, the intersection represents the event that both occur, and the complement represents the event that an event does not occur. Set operations, along with probability rules, enable us to calculate probabilities and analyze relationships between events.

  • Random Experiment:- An experiment with a known set of possible outcomes is called a random experiment if it cannot be predicted in advance which specific outcome will occur on a given execution of the experiment. Random experiments include things like coin tosses, die rolls, and card draws from a deck.
  • Outcome:- The result of any random experiment is called an outcome. Suppose you tossed a coin and got head ( H ) ( H ) (H)(H)(H) as the upper surface. So, tossing a coin is a random experiment that results in an outcome ‘head’.
  • Sample Space:- It is a set of all the possible outcomes for a random experiment. For example - Obtaining a head or a tail on the tossing of a coin is possible. Thus, S S SSS={H, T}: the Head and Tail are the sample space for tossing a coin. Similarly, on rolling a die, we can get either of the following numbers - 1, 2, 3, 4, 5, 6. Thus, S={1, 2, 3, 4, 5, 6} are the sample space for rolling a die.
  • Equally Likely Outcomes:- Events with the same theoretical probability (or likelihood) of occurring are referred to as equally likely events. For example, the relative occurrences of Head and Tail on tossing a coin for a very large number of tosses are equal. So, Head and Tail are equally likely outcomes that make the tossing of a coin fair and unbiased if it's to decide between two options.
  • Event:- In the case of a random experiment, an event is a set of possible outcomes at a specified condition. Example - On rolling of a die, 4 is not obtained. This event is the random experiment that is rolling of a die whose result is not 4. Thus, this event has 5 possible outcomes that are 1, 2, 3, 5, and 6. Suppose it's mentioned that the event F is equal to obtaining a black card while drawing a card from a deck of 52 cards. In this case, event F has 26 possible outcomes because there are 26 black cards, a total that is 13 spades and 13 clubs.

Probability Formula

Look at the example of rolling a six faced die. The possible outcomes in this experiment are 1,2,3,4,5,6, so the sample space is the set {1,2,3,4,5,6}. The ‘event’ of ‘getting a 6’ is the subset {6}. We represent this in the following diagram.
Responsive Image Embedded Image
There are six possibilities in the sample space and only one of these corresponds to getting a 6, so the probability of getting a 6 when you roll a die is 1 6 1 6 (1)/(6)\frac{1}{6}16 .
We say that the probability of an event A A AAA occuring is

P ( A ) = N u m b e r o f e l e m e n t s i n A T o t a l n u m b e r o f e l e m e n t s i n t h e s a m p l e s p a c e P ( A ) = N u m b e r o f e l e m e n t s i n A T o t a l n u m b e r o f e l e m e n t s i n t h e s a m p l e s p a c e P(A)=(NumberofelementsinA)/(Totalnumberofelementsinthesamplespace)P(A)=\frac{Number\,of \,elements\, in\, A}{Total \,number\, of\, elements\, in\, the\, sample \,space}P(A)=NumberofelementsinATotalnumberofelementsinthesamplespace

Example:-

A card is selected at random from a pack of 52 cards. Let A A AAA = ‘the card is a heart’ and B B BBB = ‘the card is an ace’.
Find P ( A ) P ( A ) P(A)P(A)P(A), P ( B ) P ( B ) P(B)P(B)P(B)?

Solution

P ( A ) P ( A ) P(A)P(A)P(A) = 13 52 13 52 (13)/(52)\frac{13}{52}1352 since there are 13 hearts in the pack.
P ( B ) P ( B ) P(B)P(B)P(B) = 4 52 4 52 (4)/(52)\frac{4}{52}452 since there are 4 aces in the pack.
To calculate the probability of an event, we simply need to find out the total number of possible outcomes of an experiment and the number of outcomes which correspond to the given event.

Exercise ...

Q u e s t i o n : Q u e s t i o n : Question:-Question:-Question:Danish Abdullah is playing a card game with a standard 52-card deck. He’s hoping for a club or a face card on his first draw. What is the probability that he draws a club or a face card on his first draw?
A n s w e r : A n s w e r : Answer:-Answer:-Answer:

Law's of Probability

  • P ( A B ) = P ( A ) + P ( B ) P ( A B ) P ( A B ) = P ( A ) + P ( B ) P ( A B ) P(A uu B)=P(A)+P(B)-P(A nn B)P(A ∪ B) = P(A) + P(B) - P(A ∩ B)P(AB)=P(A)+P(B)P(AB).
  • P ( A o n l y ) = P ( A ) P ( A B ) P ( A o n l y ) = P ( A ) P ( A B ) P(Aonly)=P(A)-P(A nn B)P(A\,only) = P(A)-P(A ∩ B)P(Aonly)=P(A)P(AB).
  • P ( B , o n l y ) = P ( B ) P ( A B ) P ( B , o n l y ) = P ( B ) P ( A B ) P(B,only)=P(B)-P(A nn B)P(B,only) = P(B)-P(A ∩ B)P(B,only)=P(B)P(AB)
  • D e M o r g a n s l a w D e M o r g a n s l a w DeMorgan^(')slawDe\,Morgan's\,lawDeMorganslaw

    • P ( A B ¯ ) = P ( A ¯ B ¯ ) P ( A B ¯ ) = P ( A ¯ B ¯ ) P( bar(A uu B))=P( bar(A)nn bar(B))P(\bar{A ∪ B})= P(\bar{A} ∩\bar{B})P(AB¯)=P(A¯B¯)
    • P ( A B ¯ ) = P ( A ¯ B ¯ ) P ( A B ¯ ) = P ( A ¯ B ¯ ) P( bar(A nn B))=P( bar(A)uu bar(B))P(\bar{A ∩ B})=P(\bar{A}∪\bar{B})P(AB¯)=P(A¯B¯)
Probability Venn Diagram with proportionally-sized regions.
Control P ( A ) , P ( B ) P ( A ) , P ( B ) P(A),P(B)P(A), P(B)P(A),P(B) and P ( A B ) P ( A B ) P(A nn B)P(A∩B)P(AB)

Events in Probability

Assume that event ( E ) ( E ) (E)(E)(E) can occur in ( r ) ( r ) (r)(r)(r) favorable ways and let ( n ) ( n ) (n)(n)(n) be the total number of ways. Then the probability of an event or success being achieved is highlighted as;

P ( E ) = r n P ( E ) = r n P(E)=(r)/(n)P(E)= \frac{r}{n}P(E)=rn

The probability of an event not occurring or being known as a failure is set out as follows:

P ( E ¯ ) = ( n r ) n = 1 r n P ( E ¯ ) = ( n r ) n = 1 r n P( bar(E))=((n-r))/(n)=1-(r)/(n)P(\bar{E})=\frac{(n-r)}{n}=1-\frac{r}{n}P(E¯)=(nr)n=1rn

Where P ( E ¯ ) P ( E ¯ ) P( bar(E))P(\bar{E})P(E¯) represents that the event ( E ) ( E ) (E)(E)(E) will not take place.
So, now we can say;

P ( E ) + P ( E ¯ ) = r n + 1 r n P ( E ) + P ( E ¯ ) = r n + 1 r n P(E)+P( bar(E))=(r)/(n)+1-(r)/(n)P(E)+P(\bar{E})=\frac{r}{n}+1-\frac{r}{n}P(E)+P(E¯)=rn+1rn

P ( E ) + P ( E ¯ ) = 1 P ( E ) + P ( E ¯ ) = 1 P(E)+P( bar(E))=1P(E)+P(\bar{E})=1P(E)+P(E¯)=1

This means that the sum of all the probabilities for any random event or test is equal to 1 1 111.

Types of Event

  1. Simple Event: A simple event is an event that represents a single outcome or elementary event in an experiment. For example, rolling a specific number on a fair die, such as rolling a 3.
  2. Compound Event: A compound event is an event that consists of two or more simple events. It involves multiple outcomes or combinations of outcomes. For example, rolling an even number or flipping a coin and getting heads.
  3. Independent Events: Independent events are events where the occurrence of one event does not affect the probability of the other event. The outcome of one event has no influence on the outcome of the other. For example, flipping a coin and rolling a die are independent events.
  • For indpendent event:- P ( A B ) = P ( A ) . P ( B ) P ( A B ) = P ( A ) . P ( B ) P(A nn B)=P(A).P(B)P(A ∩ B)= P(A).P(B)P(AB)=P(A).P(B)
  1. Dependent Events: Dependent events are events where the occurrence of one event does affect the probability of the other event. The outcome of one event impacts the outcome of the other. For example, drawing two cards from a deck without replacement, where the probability of the second card depends on the outcome of the first card.
  2. Mutually Exclusive Events: Mutually exclusive events are events that cannot occur simultaneously. If one event happens, the other event cannot happen at the same time. For example, rolling an even number and rolling an odd number are mutually exclusive events when using a fair six-sided die.
Embedded Image
  • P ( A B ) = 0 P ( A B ) = 0 P(A nn B)=0P(A ∩ B)=0P(AB)=0
  1. Exhaustive Events: Exhaustive events are events that cover all possible outcomes in an experiment. Together, they encompass the entire sample space, ensuring that at least one of the events must occur. For example, when rolling a fair six-sided die, the events of rolling an even number or rolling an odd number are exhaustive events.

Exercise ...

Q u e s t i o n : Q u e s t i o n : Question:-Question:-Question:Students at Jamia Hamdard receive an achievement award for either performing community service or making the honor roll. The school has 500 students and 180 of them received the award. There were 125 students who performed community service and 75 students who made the honor roll. What is the probability that a randomly chosen student at Jamia Hamdard performed community service and made the honor roll?
A n s w e r : A n s w e r : Answer:-Answer:-Answer:

Conditional Probability

Conditional probability is a concept in probability theory that measures the probability of an event occurring given that another event has already occurred. It is denoted as P(A|B), which represents the probability of event A happening given that event B has occurred.
The formula for conditional probability is:

P ( A | B ) = P ( A B ) P ( B ) P ( A | B ) = P ( A B ) P ( B ) P(A|B)=(P(A nn B))/(P(B))P(A|B) = \frac{P(A ∩ B)}{P(B)}P(A|B)=P(AB)P(B)

Where:
  • P ( A | B ) P ( A | B ) P(A|B)P(A|B)P(A|B) is the conditional probability of event A A AAA given event B B BBB.
  • P ( A B ) P ( A B ) P(A nn B)P(A ∩ B)P(AB) represents the probability of both events A A AAA and B B BBB occurring simultaneously.
  • P ( B ) P ( B ) P(B)P(B)P(B) is the probability of event B B BBB occurring.
In simpler terms, conditional probability allows us to update the probability of an event based on new information or conditions. It measures the likelihood of an event happening within a specific context or condition.
Note:- For indpendent event:- P ( A | B ) = P ( A ) P ( A | B ) = P ( A ) P(A|B)=P(A)P(A|B)= P(A)P(A|B)=P(A)
For example, let's say we have two events: A A AAA and B B BBB. The probability of event A A AAA occurring is 0.6 0.6 0.60.60.6, and the probability of event B B BBB occurring is 0.3 0.3 0.30.30.3 . If we want to find the probability of event A A AAA occurring given that event B B BBB has already occurred, we need to use the formula above.
Assuming there is some relationship between A A AAA and B B BBB, we would need additional information to determine P ( A B ) P ( A B ) P(A nn B)P(A ∩ B)P(AB), which represents the probability of both A A AAA and B B BBB happening together. Once we have that value, we can divide it by P ( B ) P ( B ) P(B)P(B)P(B) to calculate the conditional probability P ( A | B ) P ( A | B ) P(A|B)P(A|B)P(A|B).
Conditional probability is a fundamental concept in probability theory and has applications in various fields, including statistics, data analysis, machine learning, and decision-making. It helps us reason about uncertain events and make predictions based on available information.
Geometrical Understanding

Exercise ...

Total Probability Theorem

The Total Probability Theorem is a concept in probability theory that helps us calculate the probability of an event when we have information about its occurrence under different conditions.
Imagine you have an event, let's call it " A A AAA," and there are several possible scenarios or conditions, let's call them " B 1 B 1 B1B1B1," " B 2 B 2 B2B2B2," .......... " B n B n BnBnBn". and so on. These scenarios are mutually exclusive, meaning that only one of them can happen. The Total Probability Theorem helps us find the overall probability of event A by considering the probabilities of A happening in each scenario, and then combining them.
Embedded Image
In simpler words, the theorem says that to find the probability of event A A AAA, we should look at each scenario or condition ( B 1 , B 2 , e t c . ) ( B 1 , B 2 , e t c . ) (B1,B2,etc.)(B1, B2, etc.)(B1,B2,etc.), consider how likely event A A AAA is in each scenario, and then multiply that probability by the probability of the corresponding scenario occurring. We do this for all scenarios and then add up the results.
By using the Total Probability Theorem, we can handle situations where we don't know the direct probability of event A but have information about its occurrence under different conditions. It allows us to calculate the overall probability of A by considering all possible scenarios or conditions.
  • P ( A ) = P ( B 1 A ) + P ( B 2 A ) + P ( B 3 A ) + . . . . . + P ( B 8 A ) P ( A ) = P ( B 1 A ) + P ( B 2 A ) + P ( B 3 A ) + . . . . . + P ( B 8 A ) P(A)=P(B1nn A)+P(B2nn A)+P(B3nn A)+.....+P(B8nn A)P(A)= P(B1 ∩ A)+P(B2 ∩ A)+P(B3 ∩ A)+.....+P(B8 ∩ A)P(A)=P(B1A)+P(B2A)+P(B3A)+.....+P(B8A)

Baye's Theorem

Bayes' theorem is a fundamental concept in probability theory and statistics that allows us to update the probability of an event based on new evidence or information. It is named after the Reverend Thomas Bayes, an 18th-century British mathematician and clergyman.
Mathematically, Bayes' theorem is stated as:

P ( A B ) = P ( B A ) P ( A ) P ( B ) P ( A B ) = P ( B A ) P ( A ) P ( B ) P(A∣B)=(P(B∣A)P(A))/(P(B))P(A \mid B)=\frac{P(B \mid A) P(A)}{P(B)}P(AB)=P(BA)P(A)P(B)

Where:
P ( A | B ) P ( A | B ) P(A|B)P(A|B)P(A|B) is the conditional probability of event A A AAA given event B B BBB.
P ( B | A ) P ( B | A ) P(B|A)P(B|A)P(B|A) is the conditional probability of event B B BBB given event A A AAA.
P ( A ) P ( A ) P(A)P(A)P(A) and P ( B ) P ( B ) P(B)P(B)P(B) are the probabilities of events A A AAA and B B BBB, respectively.
In simpler terms, Bayes' theorem allows us to calculate the probability of event A A AAA occurring given that event B B BBB has already occurred, by taking into account the probability of event B B BBB given event A A AAA and the prior probabilities of events A A AAA and B B BBB.
The numerator of the formula, P ( B | A ) × P ( A ) P ( B | A ) × P ( A ) P(B|A)xxP(A){P(B|A)}\times { P(A)}P(B|A)×P(A), represents the joint probability of both events A A AAA and B B BBB occurring simultaneously. The denominator, P ( B ) P ( B ) P(B)P(B)P(B), is the probability of event B B BBB occurring, regardless of event A A AAA.
Bayes' theorem is particularly useful in situations where we have prior knowledge or beliefs about the probabilities of certain events, and we want to update those probabilities based on new evidence. It forms the foundation of Bayesian statistics, which is a statistical approach that incorporates prior knowledge and evidence to make inferences and predictions.
Bayes' theorem has applications in various fields, including medical diagnosis, spam filtering, machine learning, and artificial intelligence. It provides a framework for reasoning under uncertainty and updating probabilities as new information becomes available.
Geometrical Understanding
Imagine you have two events, A A AAA and B B BBB, and you are interested in calculating the probability of event A A AAA given that event B B BBB has occurred, denoted as P ( A | B ) P ( A | B ) P(A|B)P(A|B)P(A|B). Bayes' theorem provides a way to update our prior belief about the probability of A A AAA in light of new evidence from event B B BBB.
Geometrically, we can represent the probability space as a rectangle, with its area representing the total probability of 1 1 111.
Let's denote this rectangle as the entire space Ω Ω OmegaΩΩ.
Now, within this probability space, let's focus on a smaller subset that represents event B B BBB. This subset will have an area proportional to the probability of event B B BBB, denoted as P ( B ) P ( B ) P(B)P(B)P(B). So, B B BBB is a region within the larger rectangle Ω Ω OmegaΩΩ.
Next, we consider the conditional probability P ( A | B ) P ( A | B ) P(A|B)P(A|B)P(A|B), which is the probability of event A A AAA occurring given that event B B BBB has occurred. In terms of the geometric representation, we look at the region where both A A AAA and B B BBB occur, denoted as A B A B A nn BA ∩ BAB. The area of A B A B A nn BA ∩ BAB within the region B B BBB represents the probability of both A A AAA and B B BBB occurring, P ( A B ) P ( A B ) P(A nn B)P(A ∩ B)P(AB).
Now, let's apply Bayes' theorem:
P ( A | B ) = ( P ( B | A ) P ( A ) ) / P ( B ) P ( A | B ) = ( P ( B | A ) P ( A ) ) / P ( B ) P(A|B)=(P(B|A)**P(A))//P(B)P(A|B) = (P(B|A) * P(A)) / P(B)P(A|B)=(P(B|A)P(A))/P(B)
In geometric terms, P ( B | A ) P ( B | A ) P(B|A)P(B|A)P(B|A) represents the probability of event B B BBB occurring given that event A A AAA has occurred. This is like looking at the overlap of A A AAA and B B BBB within the region A A AAA, denoted as B A B A B nn AB ∩ ABA.
P ( A ) P ( A ) P(A)P(A)P(A) represents the prior probability of A A AAA, which is the overall probability of event A A AAA occurring without considering event B B BBB. In the geometric representation, this is the area of the region A A AAA within the entire space Ω Ω OmegaΩΩ.
Finally, P ( B ) P ( B ) P(B)P(B)P(B) is the total probability of event B B BBB occurring, which is the sum of the probabilities of B B BBB occurring under different conditions. Geometrically, this is the combined area of B B BBB and A A AAA within Ω Ω OmegaΩΩ.
If you want to dive deeper into this topic, please check out this video:-
Example:- If a person tests positive for a disease, what is the probability that he or she is actually infected?
The user can enter the following quantities by using the input boxes or the sliders:
  • Incidence is the percentage of the general population that is infected.
  • False positive rate is the probability that a person who is not infected will test positive for the disease.
  • False negative rate is the probability that a person who is infected will test negative for the disease.
The pie chart shows the conditional probability that a person is infected given that he or she tests positive for the disease.

Random Variables

In probability theory, a random variable is a mathematical function that maps outcomes of a random experiment to numerical values. It represents an uncertain quantity whose value is determined by the outcome of a random event or process. Random variables provide a way to quantify the uncertainty associated with different outcomes and are a fundamental concept in probability and statistics.
Formally, a random variable is denoted by a capital letter ( e . g . , X , Y ) ( e . g . , X , Y ) (e.g.,X,Y)(e.g., X, Y)(e.g.,X,Y) and can take on various values based on the possible outcomes of the underlying random experiment. The set of all possible values that a random variable can take is called its "sample space."
There are two main types of random variables:
  1. Discrete Random Variable:- A random variable is called discrete if it can only take on a countable number of distinct values. The probability distribution of a discrete random variable describes the probabilities associated with each possible value it can take. The probabilities must sum up to 1.
Example of a discrete random variable: The number rolled on a fair six-sided die.
  1. Continuous Random Variable:- A random variable is called continuous if it can take on any value within a certain range or interval. Continuous random variables are associated with probability density functions (PDFs) instead of probability mass functions (PMFs).
Example of a continuous random variable: The height of a person selected at random from a population.
Random variables are essential for quantifying uncertainties and making predictions in various fields, including finance, engineering, economics, and more. They serve as a bridge between theoretical probability concepts and practical applications in real-world situations.

Distribution

Distribution refers to the way in which the values of a random variable are spread or distributed across a set of possible outcomes. It provides a description of the likelihood of various possible values occurring and the associated probabilities. Distributions can be characterized by their shape, center, and spread.
There are various types of distributions, and they can be classified as either discrete or continuous:
Discrete Distribution: A discrete distribution is applicable to discrete random variables, which take on specific isolated values with gaps between them. The probability mass function (PMF) describes the probabilities of different outcomes. Examples of discrete distributions include the Bernoulli distribution, Binomial distribution, and Poisson distribution.
Continuous Distribution: A continuous distribution is applicable to continuous random variables, which can take any value within a range or interval. The probability density function (PDF) characterizes the probabilities of intervals of values. Examples of continuous distributions include the Normal distribution, Uniform distribution, and Exponential distribution.
  • Normal Distribution: The Normal distribution, also known as the Gaussian distribution, is one of the most common and important probability distributions in statistics. It is a continuous distribution characterized by a symmetric bell-shaped curve.

Discrete Probability Distribution

When dealing with discrete random variables, we use probability mass functions (PMFs) to describe their probability distributions. A probability mass function assigns probabilities to specific outcomes or values that the random variable can take.
Let's consider an example with a discrete random variable X X XXX. The probability mass function for X X XXX, denoted as P ( X = n ) P ( X = n ) P(X=n)P(X = n)P(X=n), gives the probability of X X XXX being equal to a particular value n n nnn. The PDF satisfies the following properties:
  • Non-Negativity: P ( X = n ) 0 P ( X = n ) 0 P(X=n) >= 0P(X = n) ≥ 0P(X=n)0 for all possible values of n n nnn.
  • Summation: The sum of the probabilities for all possible values of X X XXX is equal to 1: Σ P ( X = n ) = 1 Σ P ( X = n ) = 1 SigmaP(X=n)=1Σ P(X = n) = 1ΣP(X=n)=1, where the summation is taken over all possible values of X X XXX.
For instance, let's say we have a fair six-sided die, and we are interested in the random variable X representing the outcome of rolling the die. The PMF for this random variable would be:
X X XXX 1 2 3 4 5 6
P ( X = n ) P ( X = n ) P(X=n)P(X=n)P(X=n) 1 6 1 6 (1)/(6)\frac{1}{6}16 1 6 1 6 (1)/(6)\frac{1}{6}16 1 6 1 6 (1)/(6)\frac{1}{6}16 1 6 1 6 (1)/(6)\frac{1}{6}16 1 6 1 6 (1)/(6)\frac{1}{6}16 1 6 1 6 (1)/(6)\frac{1}{6}16
Here, each possible outcome has an equal probability of 1 6 1 6 (1)/(6)\frac{1}{6}16, satisfying the properties of a probability mass function.
The PDF allows us to calculate the probabilities of specific events or outcomes for discrete random variables. By summing the probabilities associated with the desired outcomes, we can determine the probability of those events occurring.
Question:- The probability distribution function for random variable is:
X X XXX 0 1 2 3 4 5 6
P ( X = n ) P ( X = n ) P(X=n)P(X=n)P(X=n) K K KKK 3 K 3 K 3K3K3K 5 K 5 K 5K5K5K 7 K 7 K 7K7K7K 9 K 9 K 9K9K9K 11 K 11 K 11 K11K11K 13 K 13 K 13 K13K13K
then find,
  1. P ( X < 4 ) P ( X < 4 ) P(X < 4)P(X<4)P(X<4)
  2. P ( 3 < X 6 ) P ( 3 < X 6 ) P(3 < X <= 6)P(3<X\leqslant6)P(3<X6)
  3. P ( X 5 ) P ( X 5 ) P(X >= 5)P(X\geqslant 5)P(X5)
 Solution:- Since it is a PDF,
0 6 P ( X = n ) = 1 0 6 P ( X = n ) = 1 sum_(0)^(6)P(X=n)=1\sum_{0}^{6}P(X=n)=106P(X=n)=1
P ( X = 0 ) + P ( X = 1 ) + P ( X = 2 ) + P ( X = 3 ) + P ( X = 4 ) + P ( X = 5 ) + P ( X = 6 ) = 1 P ( X = 0 ) + P ( X = 1 ) + P ( X = 2 ) + P ( X = 3 ) + P ( X = 4 ) + P ( X = 5 ) + P ( X = 6 ) = 1 =>P(X=0)+P(X=1)+P(X=2)+P(X=3)+P(X=4)+P(X=5)+P(X=6)=1\Rightarrow \, P(X=0)+P(X=1)+P(X=2)+P(X=3)+P(X=4)+P(X=5)+P(X=6)=1P(X=0)+P(X=1)+P(X=2)+P(X=3)+P(X=4)+P(X=5)+P(X=6)=1
K + 3 K + 5 K + 7 K + 9 K + 11 K + 13 K = 1 K + 3 K + 5 K + 7 K + 9 K + 11 K + 13 K = 1 =>K+3K+5K+7K+9K+11 K+13 K=1\Rightarrow \,K+3K+5K+7K+9K+11K+13K=1K+3K+5K+7K+9K+11K+13K=1
49 K = 1 49 K = 1 =>49 K=1\Rightarrow \,49K=149K=1
K = 1 49 K = 1 49 =>K=(1)/(49)\Rightarrow\, K = \frac{1}{49}K=149
1. P ( X < 4 ) = P ( X = 0 ) + P ( X = 1 ) + P ( X = 2 ) + P ( X = 3 ) P ( X < 4 ) = P ( X = 0 ) + P ( X = 1 ) + P ( X = 2 ) + P ( X = 3 ) P(X < 4)=P(X=0)+P(X=1)+P(X=2)+P(X=3)P(X<4)=P(X=0)+P(X=1)+P(X=2)+P(X=3)P(X<4)=P(X=0)+P(X=1)+P(X=2)+P(X=3)
K + 3 K + 5 K + 7 K K + 3 K + 5 K + 7 K =>K+3K+5K+7K\Rightarrow \, K+3K+5K+7KK+3K+5K+7K
16 K = 16 × 1 49 = 16 49 16 K = 16 × 1 49 = 16 49 =>16 K=16 xx(1)/(49)=(16)/(49)\Rightarrow \, 16K= 16\times\frac{1}{49}=\frac{16}{49}16K=16×149=1649
2. P ( 3 < X 6 ) = P ( X = 4 ) + P ( X = 5 ) + P ( X = 6 ) P ( 3 < X 6 ) = P ( X = 4 ) + P ( X = 5 ) + P ( X = 6 ) P(3 < X <= 6)=P(X=4)+P(X=5)+P(X=6)P(3<X\leqslant6)=P(X=4)+P(X=5)+P(X=6)P(3<X6)=P(X=4)+P(X=5)+P(X=6)
9 K + 11 K + 13 K 9 K + 11 K + 13 K =>9K+11 K+13 K\Rightarrow \, 9K+11K+13K9K+11K+13K
33 K = 33 × 1 49 = 33 49 33 K = 33 × 1 49 = 33 49 =>33 K=33 xx(1)/(49)=(33)/(49)\Rightarrow \, 33K=33\times\frac{1}{49}=\frac{33}{49}33K=33×149=3349
3. P ( X 5 ) = P ( X = 5 ) + P ( X = 6 ) P ( X 5 ) = P ( X = 5 ) + P ( X = 6 ) P(X >= 5)=P(X=5)+P(X=6)P(X\geq 5)= P(X=5)+P(X=6)P(X5)=P(X=5)+P(X=6)
11 K + 13 K = 24 K = 24 × 1 49 = 24 49 11 K + 13 K = 24 K = 24 × 1 49 = 24 49 =>11 K+13 K=24 K=24 xx(1)/(49)=(24)/(49)\Rightarrow \, 11K+13K=24K=24\times\frac{1}{49}=\frac{24}{49}11K+13K=24K=24×149=2449
\,
\,
\,
Question:- Find the probability distribution function (PDF) for the number of heads when a fair coin is tossed three times?
 Solution:-
When a fair coin is tossed three times, there are 8 possible outcomes:
  • HHH
  • HHT
  • HTH
  • HTT
  • THH
  • THT
  • TTH
  • TTT
The probability of getting heads (H) or tails (T) in each toss is 0.5 0.5 0.50.50.5. Therefore, the probabilities for each outcome are:
P ( HHH ) = ( 0.5 ) × ( 0.5 ) × ( 0.5 ) = 0.125 P ( HHT ) = ( 0.5 ) × ( 0.5 ) × ( 0.5 ) = 0.125 P ( HTH ) = ( 0.5 ) × ( 0.5 ) × ( 0.5 ) = 0.125 P ( HTT ) = ( 0.5 ) × ( 0.5 ) × ( 0.5 ) = 0.125 P ( THH ) = ( 0.5 ) × ( 0.5 ) × ( 0.5 ) = 0.125 P ( THT ) = ( 0.5 ) × ( 0.5 ) × ( 0.5 ) = 0.125 P ( TTH ) = ( 0.5 ) × ( 0.5 ) × ( 0.5 ) = 0.125 P ( TTT ) = ( 0.5 ) × ( 0.5 ) × ( 0.5 ) = 0.125 P ( HHH ) = ( 0.5 ) × ( 0.5 ) × ( 0.5 ) = 0.125 P ( HHT ) = ( 0.5 ) × ( 0.5 ) × ( 0.5 ) = 0.125 P ( HTH ) = ( 0.5 ) × ( 0.5 ) × ( 0.5 ) = 0.125 P ( HTT ) = ( 0.5 ) × ( 0.5 ) × ( 0.5 ) = 0.125 P ( THH ) = ( 0.5 ) × ( 0.5 ) × ( 0.5 ) = 0.125 P ( THT ) = ( 0.5 ) × ( 0.5 ) × ( 0.5 ) = 0.125 P ( TTH ) = ( 0.5 ) × ( 0.5 ) × ( 0.5 ) = 0.125 P ( TTT ) = ( 0.5 ) × ( 0.5 ) × ( 0.5 ) = 0.125 {:[P("HHH")=(0.5)xx(0.5)xx(0.5)=0.125],[P("HHT")=(0.5)xx(0.5)xx(0.5)=0.125],[P("HTH")=(0.5)xx(0.5)xx(0.5)=0.125],[P("HTT")=(0.5)xx(0.5)xx(0.5)=0.125],[P("THH")=(0.5)xx(0.5)xx(0.5)=0.125],[P("THT")=(0.5)xx(0.5)xx(0.5)=0.125],[P("TTH")=(0.5)xx(0.5)xx(0.5)=0.125],[P("TTT")=(0.5)xx(0.5)xx(0.5)=0.125]:}\begin{align*} P(\text{HHH}) &= (0.5) \times (0.5) \times (0.5) = 0.125 \\ P(\text{HHT}) &= (0.5) \times (0.5) \times (0.5) = 0.125 \\ P(\text{HTH}) &= (0.5) \times (0.5) \times (0.5) = 0.125 \\ P(\text{HTT}) &= (0.5) \times (0.5) \times (0.5) = 0.125 \\ P(\text{THH}) &= (0.5) \times (0.5) \times (0.5) = 0.125 \\ P(\text{THT}) &= (0.5) \times (0.5) \times (0.5) = 0.125 \\ P(\text{TTH}) &= (0.5) \times (0.5) \times (0.5) = 0.125 \\ P(\text{TTT}) &= (0.5) \times (0.5) \times (0.5) = 0.125 \\ \end{align*}P(HHH)=(0.5)×(0.5)×(0.5)=0.125P(HHT)=(0.5)×(0.5)×(0.5)=0.125P(HTH)=(0.5)×(0.5)×(0.5)=0.125P(HTT)=(0.5)×(0.5)×(0.5)=0.125P(THH)=(0.5)×(0.5)×(0.5)=0.125P(THT)=(0.5)×(0.5)×(0.5)=0.125P(TTH)=(0.5)×(0.5)×(0.5)=0.125P(TTT)=(0.5)×(0.5)×(0.5)=0.125
Now, let's calculate the probability of each possible number of heads:
Number of heads ( X X XXX) Probability ( P ( X ) P ( X ) P(X)P(X)P(X))
0 0.125
1 0.375
2 0.375
3 0.125
Number of heads (X) Probability (P(X)) 0 0.125 1 0.375 2 0.375 3 0.125| Number of heads ($X$) | Probability ($P(X)$) | | :---: | :---: | | 0 | 0.125 | | 1 | 0.375 | | 2 | 0.375 | | 3 | 0.125 |
The probability distribution function (PDF) for the number of heads when a fair coin is tossed three times is shown in the table above.
\,
\,
\,
Question:- A pair of dice is thrown three times then find the probability distribution function of doublets?
 Solution:-
To find the probability distribution function (PDF) of doublets when a pair of dice is thrown three times, we need to consider all the possible outcomes and their probabilities.
A doublet is when the two dice show the same number after being thrown. There are six possible doublets: ( 1 , 1 ) ( 1 , 1 ) (1,1)(1, 1)(1,1), ( 2 , 2 ) ( 2 , 2 ) (2,2)(2, 2)(2,2), ( 3 , 3 ) ( 3 , 3 ) (3,3)(3, 3)(3,3), ( 4 , 4 ) ( 4 , 4 ) (4,4)(4, 4)(4,4), ( 5 , 5 ) ( 5 , 5 ) (5,5)(5, 5)(5,5), and ( 6 , 6 ) ( 6 , 6 ) (6,6)(6, 6)(6,6).
The probability of getting a specific doublet in a single throw of a pair of dice is given by:
P ( Doublet ) = Probability of rolling the first number × Probability of rolling the second number = 1 6 × 1 6 = 1 36 P ( Doublet ) = Probability of rolling the first number × Probability of rolling the second number = 1 6 × 1 6 = 1 36 P("Doublet")="Probability of rolling the first number"xx"Probability of rolling the second number"=(1)/(6)xx(1)/(6)=(1)/(36)P(\text{Doublet}) = \text{Probability of rolling the first number} \times \text{Probability of rolling the second number} = \frac{1}{6} \times \frac{1}{6} = \frac{1}{36}P(Doublet)=Probability of rolling the first number×Probability of rolling the second number=16×16=136
Since we are throwing the pair of dice three times, the probability of getting a specific doublet three times in a row is given by:
P ( 3 Doublets ) = ( 1 36 ) × ( 1 36 ) × ( 1 36 ) = 1 46656 P ( 3  Doublets ) = 1 36 × 1 36 × 1 36 = 1 46656 P(3" Doublets")=((1)/(36))xx((1)/(36))xx((1)/(36))=(1)/(46656)P(3 \text{ Doublets}) = \left(\frac{1}{36}\right) \times \left(\frac{1}{36}\right) \times \left(\frac{1}{36}\right) = \frac{1}{46656}P(3 Doublets)=(136)×(136)×(136)=146656
Now, let's calculate the probabilities for getting different numbers of doublets:
Number of doublets ( X X XXX) Probability ( P ( X ) P ( X ) P(X)P(X)P(X))
0 P ( 0 Doublet ) = ( 1 P ( Doublet ) ) 3 = ( 1 1 36 ) 3 0.9885 P ( 0  Doublet ) = ( 1 P ( Doublet ) ) 3 = 1 1 36 3 0.9885 P(0" Doublet")=(1-P("Doublet"))^(3)=(1-(1)/(36))^(3)~~0.9885P(0 \text{ Doublet}) = (1 - P(\text{Doublet}))^3 = \left(1 - \frac{1}{36}\right)^3 \approx 0.9885P(0 Doublet)=(1P(Doublet))3=(1136)30.9885
1 P ( 1 Doublet ) = 3 × P ( Doublet ) × ( 1 P ( Doublet ) ) 2 3 × 1 36 × ( 35 36 ) 2 0.1095 P ( 1  Doublet ) = 3 × P ( Doublet ) × ( 1 P ( Doublet ) ) 2 3 × 1 36 × 35 36 2 0.1095 P(1" Doublet")=3xx P("Doublet")xx(1-P("Doublet"))^(2)~~3xx(1)/(36)xx((35)/(36))^(2)~~0.1095P(1 \text{ Doublet}) = 3 \times P(\text{Doublet}) \times (1 - P(\text{Doublet}))^2 \approx 3 \times \frac{1}{36} \times \left(\frac{35}{36}\right)^2 \approx 0.1095P(1 Doublet)=3×P(Doublet)×(1P(Doublet))23×136×(3536)20.1095
2 P ( 2 Doublets ) = 3 × P ( Doublet ) 2 × ( 1 P ( Doublet ) ) 3 × ( 1 36 ) 2 × 35 36 0.0029 P ( 2  Doublets ) = 3 × P ( Doublet ) 2 × ( 1 P ( Doublet ) ) 3 × 1 36 2 × 35 36 0.0029 P(2" Doublets")=3xx P("Doublet")^(2)xx(1-P("Doublet"))~~3xx((1)/(36))^(2)xx(35)/(36)~~0.0029P(2 \text{ Doublets}) = 3 \times P(\text{Doublet})^2 \times (1 - P(\text{Doublet})) \approx 3 \times \left(\frac{1}{36}\right)^2 \times \frac{35}{36} \approx 0.0029P(2 Doublets)=3×P(Doublet)2×(1P(Doublet))3×(136)2×35360.0029
3 P ( 3 Doublets ) 1 46656 P ( 3  Doublets ) 1 46656 P(3" Doublets")~~(1)/(46656)P(3 \text{ Doublets}) \approx \frac{1}{46656}P(3 Doublets)146656
Number of doublets (X) Probability (P(X)) 0 P(0" Doublet")=(1-P("Doublet"))^(3)=(1-(1)/(36))^(3)~~0.9885 1 P(1" Doublet")=3xx P("Doublet")xx(1-P("Doublet"))^(2)~~3xx(1)/(36)xx((35)/(36))^(2)~~0.1095 2 P(2" Doublets")=3xx P("Doublet")^(2)xx(1-P("Doublet"))~~3xx((1)/(36))^(2)xx(35)/(36)~~0.0029 3 P(3" Doublets")~~(1)/(46656)| Number of doublets ($X$) | Probability ($P(X)$) | | :---: | :---: | | 0 | $P(0 \text{ Doublet}) = (1 - P(\text{Doublet}))^3 = \left(1 - \frac{1}{36}\right)^3 \approx 0.9885$ | | 1 | $P(1 \text{ Doublet}) = 3 \times P(\text{Doublet}) \times (1 - P(\text{Doublet}))^2 \approx 3 \times \frac{1}{36} \times \left(\frac{35}{36}\right)^2 \approx 0.1095$ | | 2 | $P(2 \text{ Doublets}) = 3 \times P(\text{Doublet})^2 \times (1 - P(\text{Doublet})) \approx 3 \times \left(\frac{1}{36}\right)^2 \times \frac{35}{36} \approx 0.0029$ | | 3 | $P(3 \text{ Doublets}) \approx \frac{1}{46656}$ |
The probability distribution function (PDF) for the number of doublets when a pair of dice is thrown three times is shown in the table below.
Number of doublets ( X X XXX) Probability ( P ( X ) P ( X ) P(X)P(X)P(X))
0 0.9885
1 0.1095
2 0.0029
3 1 46656 1 46656 (1)/(46656)\frac{1}{46656}146656
Number of doublets (X) Probability (P(X)) 0 0.9885 1 0.1095 2 0.0029 3 (1)/(46656)| Number of doublets ($X$) | Probability ($P(X)$) | | :---: | :---: | | 0 | 0.9885 | | 1 | 0.1095 | | 2 | 0.0029 | | 3 | $\frac{1}{46656}$ |
\,
\,
\,

Expectation of a discrete random variable

The expectation of a discrete random variable X X XXX, often denoted as E ( X ) E ( X ) E(X)E(X)E(X) or μ μ mu\muμ, represents the average or mean value of the random variable's possible outcomes. Mathematically, for a discrete random variable X X XXX that can take values x 1 , x 2 , , x n x 1 , x 2 , , x n x_(1),x_(2),dots,x_(n)x_1, x_2, \ldots, x_nx1,x2,,xn with corresponding probabilities P ( X = x 1 ) , P ( X = x 2 ) , , P ( X = x n ) P ( X = x 1 ) , P ( X = x 2 ) , , P ( X = x n ) P(X=x_(1)),P(X=x_(2)),dots,P(X=x_(n))P(X=x_1), P(X=x_2), \ldots, P(X=x_n)P(X=x1),P(X=x2),,P(X=xn), the expectation is given by:

E ( X ) = M e a n ( μ ) = x 1 P ( X = x 1 ) + x 2 P ( X = x 2 ) + + x n P ( X = x n ) E ( X ) = M e a n ( μ ) = x 1 P ( X = x 1 ) + x 2 P ( X = x 2 ) + + x n P ( X = x n ) E(X)=Mean(mu)=x_(1)*P(X=x_(1))+x_(2)*P(X=x_(2))+dots+x_(n)*P(X=x_(n))E(X) =Mean(\mu)= x_1 \cdot P(X=x_1) + x_2 \cdot P(X=x_2) + \ldots + x_n \cdot P(X=x_n)E(X)=Mean(μ)=x1P(X=x1)+x2P(X=x2)++xnP(X=xn)

In simpler terms, you multiply each possible outcome by its probability and sum up these products to obtain the expectation.
Here's a step-by-step example to calculate the expectation of a discrete random variable:
Let's say we have a discrete random variable X X XXX representing the outcome of rolling a fair six-sided die, and its possible values are { 1 , 2 , 3 , 4 , 5 , 6 } { 1 , 2 , 3 , 4 , 5 , 6 } {1,2,3,4,5,6}\{1, 2, 3, 4, 5, 6\}{1,2,3,4,5,6}, each with a probability of 1 6 1 6 (1)/(6)\frac{1}{6}16.
E ( X ) = ( 1 1 6 ) + ( 2 1 6 ) + ( 3 1 6 ) + ( 4 1 6 ) + ( 5 1 6 ) + ( 6 1 6 ) E ( X ) = ( 1 1 6 ) + ( 2 1 6 ) + ( 3 1 6 ) + ( 4 1 6 ) + ( 5 1 6 ) + ( 6 1 6 ) E(X)=(1*(1)/(6))+(2*(1)/(6))+(3*(1)/(6))+(4*(1)/(6))+(5*(1)/(6))+(6*(1)/(6))E(X) = (1 \cdot \frac{1}{6}) + (2 \cdot \frac{1}{6}) + (3 \cdot \frac{1}{6}) + (4 \cdot \frac{1}{6}) + (5 \cdot \frac{1}{6}) + (6 \cdot \frac{1}{6})E(X)=(116)+(216)+(316)+(416)+(516)+(616)
E ( X ) = 1 6 + 2 6 + 3 6 + 4 6 + 5 6 + 6 6 E ( X ) = 1 6 + 2 6 + 3 6 + 4 6 + 5 6 + 6 6 E(X)=(1)/(6)+(2)/(6)+(3)/(6)+(4)/(6)+(5)/(6)+(6)/(6)E(X) = \frac{1}{6} + \frac{2}{6} + \frac{3}{6} + \frac{4}{6} + \frac{5}{6} + \frac{6}{6}E(X)=16+26+36+46+56+66
E ( X ) = 21 6 E ( X ) = 21 6 E(X)=(21)/(6)E(X) = \frac{21}{6}E(X)=216
E ( X ) = 3.5 E ( X ) = 3.5 E(X)=3.5E(X) = 3.5E(X)=3.5
So, the expectation of rolling a fair six-sided die is 3.5. This means that, on average, we can expect the outcome of the die roll to be around 3.5, even though 3.5 itself is not one of the possible outcomes of rolling a regular six-sided die.
2. E ( X 2 ) E ( X 2 ) E(X^(2))E(X^2)E(X2) (Expectation of X 2 X 2 X^(2)X^2X2):
E ( X 2 ) = i = 1 n x i 2 P ( X = x i ) E ( X 2 ) = i = 1 n x i 2 P ( X = x i ) E(X^(2))=sum_(i=1)^(n)x_(i)^(2)*P(X=x_(i))E(X^2) = \sum_{i=1}^{n} x_i^2 \cdot P(X=x_i)E(X2)=i=1nxi2P(X=xi)
E ( X 2 ) = x 1 2 P ( X = x 1 ) + x 2 2 P ( X = x 2 ) + + x n 2 P ( X = x n ) E ( X 2 ) = x 1 2 P ( X = x 1 ) + x 2 2 P ( X = x 2 ) + + x n 2 P ( X = x n ) E(X^(2))=x_(1)^(2)*P(X=x_(1))+x_(2)^(2)*P(X=x_(2))+dots+x_(n)^(2)*P(X=x_(n))E(X^2) = x_1^2 \cdot P(X=x_1) + x_2^2 \cdot P(X=x_2) + \ldots + x_n^2 \cdot P(X=x_n)E(X2)=x12P(X=x1)+x22P(X=x2)++xn2P(X=xn)
E ( X 2 ) E ( X 2 ) E(X^(2))E(X^2)E(X2) represents the average value of the squared outcomes of a discrete random variable X X XXX. It is used to calculate the variance Var ( X ) Var ( X ) "Var"(X)\text{Var}(X)Var(X).
3. Var ( X ) Var ( X ) "Var"(X)\text{Var}(X)Var(X) (Variance of X X XXX):
Var ( X ) = E ( X 2 ) ( E ( X ) ) 2 Var ( X ) = E ( X 2 ) ( E ( X ) ) 2 "Var"(X)=E(X^(2))-(E(X))^(2)\text{Var}(X) = E(X^2) - (E(X))^2Var(X)=E(X2)(E(X))2
Var ( X ) Var ( X ) "Var"(X)\text{Var}(X)Var(X) measures the spread or dispersion of the random variable X X XXX from its mean. It is the difference between the expectation of X 2 X 2 X^(2)X^2X2 and the square of the expectation of X X XXX.
4. E ( f ( X ) ) E ( f ( X ) ) E(f(X))E(f(X))E(f(X)) (Expectation of a Function of X X XXX):
E ( f ( X ) ) = i = 1 n f ( x i ) P ( X = x i ) E ( f ( X ) ) = i = 1 n f ( x i ) P ( X = x i ) E(f(X))=sum_(i=1)^(n)f(x_(i))*P(X=x_(i))E(f(X)) = \sum_{i=1}^{n} f(x_i) \cdot P(X=x_i)E(f(X))=i=1nf(xi)P(X=xi)
E ( f ( X ) ) = f ( x 1 ) P ( X = x 1 ) + f ( x 2 ) P ( X = x 2 ) + + f ( x n ) P ( X = x n ) E ( f ( X ) ) = f ( x 1 ) P ( X = x 1 ) + f ( x 2 ) P ( X = x 2 ) + + f ( x n ) P ( X = x n ) E(f(X))=f(x_(1))*P(X=x_(1))+f(x_(2))*P(X=x_(2))+dots+f(x_(n))*P(X=x_(n))E(f(X)) = f(x_1) \cdot P(X=x_1) + f(x_2) \cdot P(X=x_2) + \ldots + f(x_n) \cdot P(X=x_n)E(f(X))=f(x1)P(X=x1)+f(x2)P(X=x2)++f(xn)P(X=xn)
E ( f ( X ) ) E ( f ( X ) ) E(f(X))E(f(X))E(f(X)) is the average value of the function f ( X ) f ( X ) f(X)f(X)f(X) applied to the possible outcomes of the random variable X X XXX. Expectation is a linear operator, meaning that it follows certain rules when dealing with functions and constants.
These formulas are fundamental in probability theory and statistics, playing a key role in various statistical measures and analyses.
\,
\,
\,
Question:- The PDF of random variable is given by:
X X XXX 1 2 3 4
P ( X = n ) P ( X = n ) P(X=n)P(X=n)P(X=n) 1 4 1 4 (1)/(4)\frac{1}{4}14 1 4 1 4 (1)/(4)\frac{1}{4}14 1 4 1 4 (1)/(4)\frac{1}{4}14 1 4 1 4 (1)/(4)\frac{1}{4}14
Find,
  1. E ( X ) E ( X ) E(X)E(X)E(X)
  2. E ( X 2 ) E ( X 2 ) E(X^(2))E(X^2)E(X2)
  3. V a r ( X ) V a r ( X ) Var(X)Var(X)Var(X)
  4. E ( 2 X + 1 ) E ( 2 X + 1 ) E(2X+1)E(2X+1)E(2X+1)
 Solution:-
1. E ( X ) = n = 1 4 P i X i 1 × 1 4 + 2 × 1 4 + 3 × 1 4 + 4 × 1 4 E ( X ) = n = 1 4 P i X i 1 × 1 4 + 2 × 1 4 + 3 × 1 4 + 4 × 1 4 E(X)=sum_(n=1)^(4)P_(i)X_(i)=>1xx(1)/(4)+2xx(1)/(4)+3xx(1)/(4)+4xx(1)/(4)E(X)=\sum_{n=1}^{4}P_{i}X_{i}\Rightarrow1\times\frac{1}{4}+2\times\frac{1}{4}+3\times\frac{1}{4}+4\times\frac{1}{4}E(X)=n=14PiXi1×14+2×14+3×14+4×14
\,
1 4 × ( 1 + 2 + 3 + 4 ) 1 4 × 10 5 2 1 4 × ( 1 + 2 + 3 + 4 ) 1 4 × 10 5 2 =>(1)/(4)xx(1+2+3+4)=>(1)/(4)xx10=>(5)/(2)\Rightarrow\frac{1}{4}\times(1+2+3+4)\Rightarrow\frac{1}{4}\times10\Rightarrow\frac{5}{2}14×(1+2+3+4)14×1052
\,
2. E ( X 2 ) = i = 1 n x i 2 P i E ( X 2 ) = i = 1 n x i 2 P i E(X^(2))=sum_(i=1)^(n)x_(i)^(2)*P_(i)E(X^2)=\sum_{i=1}^{n} x_i^2 \cdot P_{i}E(X2)=i=1nxi2Pi
( 1 ) 2 × 1 4 + ( 2 ) 2 × 1 4 + ( 3 ) 2 × 1 4 + ( 4 ) 2 × 1 4 ( 1 ) 2 × 1 4 + ( 2 ) 2 × 1 4 + ( 3 ) 2 × 1 4 + ( 4 ) 2 × 1 4 =>(1)^(2)xx(1)/(4)+(2)^(2)xx(1)/(4)+(3)^(2)xx(1)/(4)+(4)^(2)xx(1)/(4)\Rightarrow\,(1)^2\times\frac{1}{4}+(2)^2\times\frac{1}{4}+(3)^2\times\frac{1}{4}+(4)^2\times\frac{1}{4}(1)2×14+(2)2×14+(3)2×14+(4)2×14
1 4 + 4 4 + 9 4 + 16 4 1 4 + 1 1 + 9 4 + 4 1 15 2 1 4 + 4 4 + 9 4 + 16 4 1 4 + 1 1 + 9 4 + 4 1 15 2 =>(1)/(4)+(4)/(4)+(9)/(4)+(16)/(4)=>(1)/(4)+(1)/(1)+(9)/(4)+(4)/(1)=>(15)/(2)\Rightarrow\,\frac{1}{4}+\frac{4}{4}+\frac{9}{4}+\frac{16}{4}\,\Rightarrow\,\frac{1}{4}+\frac{1}{1}+\frac{9}{4}+\frac{4}{1}\Rightarrow\,\frac{15}{2}14+44+94+16414+11+94+41152
\,
3. V a r ( X ) = E ( X 2 ) ( E ( X ) ) 2 V a r ( X ) = E ( X 2 ) ( E ( X ) ) 2 Var(X)=E(X^(2))-(E(X))^(2)Var(X)=E(X^2) - (E(X))^2Var(X)=E(X2)(E(X))2
15 2 ( 5 2 ) 2 5 4 15 2 ( 5 2 ) 2 5 4 =>(15)/(2)-((5)/(2))^(2)=>(5)/(4)\Rightarrow\,\frac{15}{2}-(\frac{5}{2})^2\Rightarrow\,\frac{5}{4}152(52)254
\,
4. E ( 2 X + 1 ) = i = 1 n ( 2 X i + 1 ) 2 P i E ( 2 X + 1 ) = i = 1 n ( 2 X i + 1 ) 2 P i E(2X+1)=sum_(i=1)^(n)(2X_(i)+1)^(2)*P_(i)E(2X+1)=\sum_{i=1}^{n} (2X_{i}+1)^2 \cdot P_{i}E(2X+1)=i=1n(2Xi+1)2Pi
( 2 × 1 + 1 ) 1 4 + ( 2 × 2 + 1 ) 1 4 + ( 2 × 3 + 1 ) 1 4 + ( 2 × 4 + 1 ) 1 4 ( 2 × 1 + 1 ) 1 4 + ( 2 × 2 + 1 ) 1 4 + ( 2 × 3 + 1 ) 1 4 + ( 2 × 4 + 1 ) 1 4 =>(2xx1+1)*(1)/(4)+(2xx2+1)*(1)/(4)+(2xx3+1)*(1)/(4)+(2xx4+1)*(1)/(4)\Rightarrow\,(2\times1+1)\cdot\frac{1}{4}+(2\times2+1)\cdot\frac{1}{4}+(2\times3+1)\cdot\frac{1}{4}+(2\times4+1)\cdot\frac{1}{4}(2×1+1)14+(2×2+1)14+(2×3+1)14+(2×4+1)14
3 4 + 5 4 + 7 4 + 9 4 6 3 4 + 5 4 + 7 4 + 9 4 6 =>(3)/(4)+(5)/(4)+(7)/(4)+(9)/(4)=>6\Rightarrow\,\frac{3}{4}+\frac{5}{4}+\frac{7}{4}+\frac{9}{4}\Rightarrow\,634+54+74+946
\,
\,
\,

Moment Generating Function (MGF) of Discrete Random Variable

The Moment Generating Function (MGF) of a discrete random variable is a mathematical function that uniquely characterizes the random variable and provides a way to find its moments. It is defined as the expected value of the exponential function raised to the power of the random variable multiplied by a constant t t ttt. For a discrete random variable X X XXX with probability mass function (PMF) P ( X = x ) P ( X = x ) P(X=x)P(X = x)P(X=x), the MGF is given by:
M X ( t ) = E [ e t X ] = x e t x P ( X = x ) M X ( t ) = E [ e t X ] = x e t x P ( X = x ) M_(X)(t)=E[e^(tX)]=sum_(x)e^(tx)*P(X=x)M_X(t) = E[e^{tX}] = \sum_{x} e^{tx} \cdot P(X = x)MX(t)=E[etX]=xetxP(X=x)
where the summation is taken over all possible values of the random variable X X XXX.
The MGF has several important properties:
  1. The MGF is defined for all values of t t ttt in an interval containing zero.
  2. The n n nnnth moment of the random variable can be obtained by differentiating the MGF n n nnn times with respect to t t ttt and setting t = 0 t = 0 t=0t = 0t=0. Specifically, the n n nnnth moment is given by E [ X n ] = M X ( n ) ( 0 ) E [ X n ] = M X ( n ) ( 0 ) E[X^(n)]=M_(X)^((n))(0)E[X^n] = M_X^{(n)}(0)E[Xn]=MX(n)(0), where M X ( n ) ( 0 ) M X ( n ) ( 0 ) M_(X)^((n))(0)M_X^{(n)}(0)MX(n)(0) represents the n n nnnth derivative of M X ( t ) M X ( t ) M_(X)(t)M_X(t)MX(t) evaluated at t = 0 t = 0 t=0t = 0t=0.
  3. If the MGF exists and is finite in a neighborhood of zero, then it uniquely determines the probability distribution of the random variable X X XXX.
The MGF is particularly useful in finding moments of a random variable, especially in cases where finding the moments directly from the PMF may be difficult or tedious. Additionally, the MGF is applicable to both discrete and continuous random variables, providing a unified approach to handling various types of distributions. However, not all random variables have a valid MGF for all values of t t ttt, especially when the distribution is heavy-tailed or lacks certain moments.
\,
\,
\,
Question:- Let 'X' be discrete random variable with PDF:
X X XXX 1 2 3 4 5 6
P ( X = n ) P ( X = n ) P(X=n)P(X=n)P(X=n) 1 6 1 6 (1)/(6)\frac{1}{6}16 1 6 1 6 (1)/(6)\frac{1}{6}16 1 6 1 6 (1)/(6)\frac{1}{6}16 1 6 1 6 (1)/(6)\frac{1}{6}16 1 6 1 6 (1)/(6)\frac{1}{6}16 1 6 1 6 (1)/(6)\frac{1}{6}16
then, find the MGF?
 Hint:-
M ( t ) = E [ e t X ] M ( t ) = E [ e t X ] M(t)=E[e^(tX)]M(t) = E[e^{tX}]M(t)=E[etX]
\,
\,
\,

Binomial Distribution

The binomial distribution is a discrete probability distribution that describes the number of successes in a fixed number of independent Bernoulli trials (experiments) with the same probability of success, denoted by p p ppp. Each trial can have only two possible outcomes, usually labeled as "success" (probability p p ppp) and "failure" (probability 1 p 1 p 1-p1-p1p).
Let's denote the random variable that follows a binomial distribution as X X XXX. The probability mass function (PMF) of the binomial distribution is given by:

P ( X = k ) = n C k p k ( 1 p ) n k , P ( X = k ) = n C k p k ( 1 p ) n k , P(X=k)=^(n)"C"_(k)*p^(k)*(1-p)^(n-k),P(X = k) =\, ^{n}\textrm{C}_{k}\cdot p^k \cdot (1-p)^{n-k},P(X=k)=nCkpk(1p)nk,

where:
  • P ( X = k ) P ( X = k ) P(X=k)P(X = k)P(X=k) is the probability that there are k k kkk successes in n n nnn trials.
  • n n nnn is the number of trials (fixed and known in advance).
  • k k kkk is the number of successes (the value we want to find the probability for).
  • p p ppp is the probability of success on each individual trial.
  • n C k n C k ^(n)"C"_(k)^{n}\textrm{C}_{k}nCk is the binomial coefficient, also known as "n choose k," which is the number of ways to choose k k kkk successes from n n nnn trials, given by n C k = n ! k ! ( n k ) ! n C k = n ! k ! ( n k ) ! ^(n)"C"_(k)=(n!)/(k!(n-k)!)^{n}\textrm{C}_{k} = \frac{n!}{k!(n-k)!}nCk=n!k!(nk)!.
Note:- Some times we use q = 1 p q = 1 p q=1-p\,\,\,q=1-pq=1p
The mean (expected value) and variance of a binomial distribution are given by:
E [ X ] = M e a n ( μ ) = n p E [ X ] = M e a n ( μ ) = n p E[X]=Mean(mu)=n*pE[X] =Mean(\mu)=n \cdot pE[X]=Mean(μ)=np
V a r [ X ] = n p ( 1 p ) = n p q V a r [ X ] = n p ( 1 p ) = n p q Var[X]=n*p*(1-p)=n*p*qVar[X] = n \cdot p \cdot (1-p)=n\cdot p\cdot qVar[X]=np(1p)=npq
Key Properties of the Binomial Distribution:
  1. Each trial is independent of others.
  2. There are only two outcomes (success or failure) for each trial.
  3. The probability of success ( p p ppp) is constant for all trials.
  4. The random variable X X XXX represents the count of successes in n n nnn trials.
  5. The binomial distribution is symmetric when p = 0.5 p = 0.5 p=0.5p = 0.5p=0.5, and it is positively skewed for p < 0.5 p < 0.5 p < 0.5p < 0.5p<0.5 and negatively skewed for p > 0.5 p > 0.5 p > 0.5p > 0.5p>0.5.
  6. As n n nnn increases, the binomial distribution approaches the normal distribution if n p n p npnpnp and n ( 1 p ) n ( 1 p ) n(1-p)n(1-p)n(1p) are sufficiently large.
The binomial distribution is commonly used in various fields, such as statistics, genetics, quality control, and polling, where we are interested in the number of successes in a fixed number of trials with a known probability of success.
\,
Question:- A coin is tossed 5-times, the, find the probability rarr\rightarrow
  1. Getting exactly 3 heads.
  2. Getting at least 3 heads.
  3. Getting at most 4 heads.
 Solution:-
n = 5 n = 5 n=5n=5n=5
p = 1 2 p = 1 2 p=(1)/(2)p=\frac{1}{2}p=12
1. P ( X = 3 ) = n C k p k ( 1 p ) n k P ( X = 3 ) = n C k p k ( 1 p ) n k P(X=3)=^(n)"C"_(k)*p^(k)*(1-p)^(n-k)P(X=3)=^{n}\textrm{C}_{k}\cdot p^k \cdot (1-p)^{n-k}P(X=3)=nCkpk(1p)nk
5 C 3 1 2 3 ( 1 1 2 ) 5 3 5 C 3 1 2 3 ( 1 1 2 ) 5 3 =>^(5)"C"_(3)*(1)/(2)^(3)*(1-(1)/(2))^(5-3)\Rightarrow \,^{5}\textrm{C}_{3}\cdot \frac{1}{2}^3 \cdot (1-\frac{1}{2})^{5-3}5C3123(112)53
5 16 5 16 =>(5)/(16)\Rightarrow\,\frac{5}{16}516
\,
2. P ( X 3 ) = P ( X = 3 ) + P ( X = 4 ) + P ( X = 5 ) P ( X 3 ) = P ( X = 3 ) + P ( X = 4 ) + P ( X = 5 ) P(X >= 3)=P(X=3)+P(X=4)+P(X=5)P(X\geq 3)=P(X=3)+P(X=4)+P(X=5)P(X3)=P(X=3)+P(X=4)+P(X=5)
5 C 3 1 2 3 ( 1 1 2 ) 5 3 + 5 C 4 1 2 4 ( 1 1 2 ) 5 4 + 5 C 5 1 2 5 ( 1 1 2 ) 5 5 5 C 3 1 2 3 ( 1 1 2 ) 5 3 + 5 C 4 1 2 4 ( 1 1 2 ) 5 4 + 5 C 5 1 2 5 ( 1 1 2 ) 5 5 =>^(5)"C"_(3)*(1)/(2)^(3)*(1-(1)/(2))^(5-3)+^(5)"C"_(4)*(1)/(2)^(4)*(1-(1)/(2))^(5-4)+^(5)"C"_(5)*(1)/(2)^(5)*(1-(1)/(2))^(5-5)\Rightarrow \,^{5}\textrm{C}_{3}\cdot \frac{1}{2}^3 \cdot (1-\frac{1}{2})^{5-3}+\,^{5}\textrm{C}_{4}\cdot \frac{1}{2}^4 \cdot (1-\frac{1}{2})^{5-4}+\,^{5}\textrm{C}_{5}\cdot \frac{1}{2}^5 \cdot (1-\frac{1}{2})^{5-5}5C3123(112)53+5C4124(112)54+5C5125(112)55
1 2 1 2 =>(1)/(2)\Rightarrow\, \frac{1}{2}12
\,
\,
Exersise:- A multiple-choice test has 8 problems. Each problem has 4 answer choices, and only 1 correct answer. You haven’t studied at all, and decide that your only chance to earn at least some points is to guess. Is this situation an example of a binomial distribution? Create a probability distribution for the number of problems you could answer correctly by guessing. What is the probability that your grade on the test will be 80% or greater?

Poisson Distribution

The Poisson distribution is a discrete probability distribution that models the number of events that occur in a fixed interval of time or space. It is used to describe rare events with a known average rate of occurrence ( λ λ lambda\lambdaλ).
The probability mass function (PMF) of the Poisson distribution is given by:
P ( X = k ) = e λ λ k k ! , P ( X = k ) = e λ λ k k ! , P(X=k)=(e^(-lambda)*lambda ^(k))/(k!),P(X = k) = \frac{e^{-\lambda} \cdot \lambda^k}{k!},P(X=k)=eλλkk!,
where:
  • X X XXX is the random variable representing the number of events.
  • k k kkk is the number of events ( 0 , 1 , 2 , 0 , 1 , 2 , 0,1,2,dots0, 1, 2, \ldots0,1,2,).
  • λ λ lambda\lambdaλ is the average rate of occurrence of events in the given interval.
The mean (expected value) and variance of the Poisson distribution are both equal to λ λ lambda\lambdaλ.
Example:
  • Let Lambda be the mean of people making line at a random moment.
  • Select the number of people making line at that random moment.
  • What is the probability of X persons making line at that moment?.
    Play with the sliders and find out the answer
The Poisson distribution is commonly used in various fields, such as modeling rare events in insurance, telecommunications, and queuing systems, where events occur randomly and independently at a constant average rate.
Question:
The number of customers arriving at a coffee shop follows a Poisson distribution with an average rate of 5 customers per hour.
a) What is the probability that exactly 3 customers arrive in the next hour?
b) What is the probability that more than 7 customers arrive in the next two hours?
 Solution:
a) To find the probability that exactly 3 customers arrive in the next hour, we will use the Poisson probability formula:
For a Poisson distribution with rate λ λ lambda\lambdaλ and a random variable X X XXX representing the number of events, the probability of getting exactly x x xxx events is given by:
P ( X = x ) = e λ λ x x ! P ( X = x ) = e λ λ x x ! P(X=x)=((e^(-lambda)*lambda ^(x)))/((x!))P(X = x) = \frac{{e^{-\lambda} \cdot \lambda^x}}{{x!}}P(X=x)=eλλxx!
where e e eee is the base of the natural logarithm (approximately 2.71828).
In this case, λ = 5 λ = 5 lambda=5\lambda = 5λ=5 (average rate of customers per hour) and x = 3 x = 3 x=3x = 3x=3 (exactly 3 customers).
P ( X = 3 ) = e 5 5 3 3 ! P ( X = 3 ) = e 5 5 3 3 ! P(X=3)=((e^(-5)*5^(3)))/((3!))P(X = 3) = \frac{{e^{-5} \cdot 5^3}}{{3!}}P(X=3)=e5533!
P ( X = 3 ) = e 5 125 6 P ( X = 3 ) = e 5 125 6 P(X=3)=((e^(-5)*125))/(6)P(X = 3) = \frac{{e^{-5} \cdot 125}}{{6}}P(X=3)=e51256
To find the numerical value of P ( X = 3 ) P ( X = 3 ) P(X=3)P(X = 3)P(X=3), you can use a calculator or software to compute the expression. The approximate value is:
P ( X = 3 ) 0.140373 P ( X = 3 ) 0.140373 P(X=3)~~0.140373P(X = 3) \approx 0.140373P(X=3)0.140373
b) To find the probability that more than 7 customers arrive in the next two hours, we need to consider the cumulative probability. The number of customers arriving in two hours follows a Poisson distribution with rate λ = 2 λ = 2 5 = 10 λ = 2 λ = 2 5 = 10 lambda^(')=2*lambda=2*5=10\lambda' = 2 \cdot \lambda = 2 \cdot 5 = 10λ=2λ=25=10.
Let Y Y YYY be the number of customers arriving in the next two hours. We want to find P ( Y > 7 ) P ( Y > 7 ) P(Y > 7)P(Y > 7)P(Y>7), which can be calculated as follows:
P ( Y > 7 ) = 1 P ( Y 7 ) P ( Y > 7 ) = 1 P ( Y 7 ) P(Y > 7)=1-P(Y <= 7)P(Y > 7) = 1 - P(Y \leq 7)P(Y>7)=1P(Y7)
To find P ( Y 7 ) P ( Y 7 ) P(Y <= 7)P(Y \leq 7)P(Y7), we sum the probabilities of getting 0, 1, 2, ..., 7 customers in the next two hours using the Poisson probability formula:
P ( Y 7 ) = x = 0 7 e 10 10 x x ! P ( Y 7 ) = x = 0 7 e 10 10 x x ! P(Y <= 7)=sum_(x=0)^(7)((e^(-10)*10 ^(x)))/((x!))P(Y \leq 7) = \sum_{x=0}^{7} \frac{{e^{-10} \cdot 10^x}}{{x!}}P(Y7)=x=07e1010xx!
Once again, you can use a calculator or software to find the numerical value of P ( Y 7 ) P ( Y 7 ) P(Y <= 7)P(Y \leq 7)P(Y7). The approximate value is:
P ( Y 7 ) 0.967206 P ( Y 7 ) 0.967206 P(Y <= 7)~~0.967206P(Y \leq 7) \approx 0.967206P(Y7)0.967206
Now, calculate P ( Y > 7 ) P ( Y > 7 ) P(Y > 7)P(Y > 7)P(Y>7):
P ( Y > 7 ) = 1 0.967206 P ( Y > 7 ) = 1 0.967206 P(Y > 7)=1-0.967206P(Y > 7) = 1 - 0.967206P(Y>7)=10.967206
P ( Y > 7 ) 0.032794 P ( Y > 7 ) 0.032794 P(Y > 7)~~0.032794P(Y > 7) \approx 0.032794P(Y>7)0.032794
Therefore, the probability that more than 7 customers arrive in the next two hours is approximately 0.032794, or 3.28%.